/**
 * Copyright (C), 2019-2022, 宇信融汇
 * FileName: DogWeigthComparator
 * Author:   666
 * Date:     2022/4/27 21:14
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 666           修改时间           版本号              描述
 */
package com.strategy;

/**
 * @Classname DogWeigthComparator
 * @Description TODO
 * @Date 2022/4/27 21:14
 * @Created by 666
 */
public class DogWeigthComparator implements Comparator<Dog> {
    @Override
    public int compare(Dog o1, Dog o2) {
        if (o1.heigth > o2.weigth) return -1;
        else if (o1.weigth < o2.weigth) return 1;
        return 0;
    }
}
